﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Smart_Transportation.BAL;
using System.Data;

namespace Smart_Transportation.GUI.Manage_Account
{
    public partial class ManageAccount : System.Web.UI.Page
    {
        BALUser balUser = new BALUser(); 
        /// <summary>
        /// Page load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            gvListAllAccount.Visible = false;
        }
        /// <summary>
        /// Click to button Add account
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btAddUser_Click(object sender, EventArgs e)
        {
            Response.Redirect("AddAccountPage.aspx");
        }
        /// <summary>
        /// Click to button list all account
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btListallAccount_Click(object sender, EventArgs e)
        {
            this.gvListAllAccount.DataSource = balUser.ListAllUser();
            this.gvListAllAccount.DataBind();
        }
    }
}